\section{Architecture}

The atmospheric model architecture will be based on packages.

The definition of a package is that it can be built and tested independently. Interfaces will be testable for performance and
correctness using "unit testers". The packages and the interface routines constitute the model layer of a three layered
software design. The model layer calls routines from a utility layer which may call routines from a library layer.  The design
isolates the interface to installation specific math libraries or other optimized routines in the utility layer.  The distinction
between the utility layer and the library layer will be flexible as we expect to define this interface to fit the typical installation
of the code and to clarify the interface with special libraries.  The utility layer will be distributed with the code, while it is
expected that the library layer will only contain default or filler routines. 

The atmospheric model package will consist of five sub-packages 

\begin{itemize}
\item atmospheric driver 
\item dynamics package 
\item physical parameterization package 
\item history file and I/O package 
\item surface (boundary) package 
\end{itemize}

In keeping with the object orientation for the specification of interfaces, packages will communicate with each other through
state objects, consisting of state data and methods for moving the data between package data structures.  The required
methods may include changing the data decomposition, regridding, calculation of derived variables and conversion between
states, tendencies or fluxes.  Interface routines will use inquiry functions to obtain data from the state structure and will pass
arrays to the working code. 


